-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R pkgdown support #1208
R pkgdown support #1208
Conversation
@guolinke You can see how the LightGBM R-package documentation looks like here: https://htmlpreview.github.io/?https://github.com/Laurae2/LightGBM/blob/pkgdown/R-package/docs/index.html |
R-package/R/lgb.Booster.R
Outdated
@@ -625,6 +625,9 @@ Booster <- R6Class( | |||
#' | |||
#' @examples | |||
#' \dontrun{ | |||
#' # It crashes the documentation generation, skipping | |||
#' if (!(pkgdown::in_pkgdown())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why these crash ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is because I used the version without ffeae5a
I can now remove the crash workarounds with your fix.
@guolinke I think we can do the 8 missing steps in another PR. (can merge this one) |
Waiting for #1260 to pass first then going to redo this PR from scratch + put the doc in docs folder instead of the R folder. |
This pull request is to add R pkgdown support to the LightGBM R-package.
Fixes #1143
Warning: huge pull request. It affects only the LightGBM R documentation and not how it works. I will regenerate the documentation on a regular basis when I have time.
To not merge yet.
Request vignettes you want to see. I'm out of ideas currently.
It involves refactoring all demos to vignettes and creating the appropriate .yml file for pkgdown. I included the original .yml file for the website and the script used to:
devtools
,roxygen2
,pkgdown
)pkgdown
I used my own
pkgdown
because the originalpkgdown
refuses to show everyone in the fieldAuthors@R
.It still requires the following:
Matrix
andmethods
to Depends instead of Imports (fixes many instances of example crashes)pkgdown::build_site()
on the R-package folder without vignettespkgdown::build_site()
on the R-package folder with vignettesBonus and nice to have:
Example pictures: